<?php
/**
 * Created by PhpStorm.
 * User: 何培春
 * Date: 2017/9/15
 * Time: 9:09
 */

namespace Admin\Controller;
use Think\Controller;


class BaseControlle extends Controller
{
    public function __construct()
    {
        parent::__construct();
        if(!If_Login()){
            if(!If_Login_Session()){//发现session有空,则清除登陆信息
                Login_Out();
                $this->error('您未登录,或者登录失效!',U('Login/index'));
            }
        }
    }

    private function PromptInformation($msg){

        if(IS_AJAX){
            $this->error($msg,null,true);
            exit();
        }else{
            //$this->error($msg);
            $this->assign('msg',$msg);
            $this->display('Index/PromptInformation');
            exit;
        }


    }

}